//
//  HomeWebViewController.swift
//  SinaWeibo
//
//  Created by 张洪毓 on 15/11/23.
//  Copyright © 2015年 张洪毓. All rights reserved.
//

import UIKit
import SVProgressHUD
class HomeWebViewController: UIViewController,UIWebViewDelegate{

    var webView = UIWebView()
    var urlString: String?
    
    override func loadView() {
        view = webView
        webView.delegate = self
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        if let url = NSURL(string: urlString ?? "") {
            let request = NSURLRequest(URL: url)
            webView.loadRequest(request)
        }
    }
    
    func webViewDidStartLoad(webView: UIWebView) {
        SVProgressHUD.show()
    }
    
    func webViewDidFinishLoad(webView: UIWebView) {
        SVProgressHUD.dismiss()
    }

}
